#include <stdlib.h>
#include <vector>
#include <math.h>
#include <ncurses.h>
#include <time.h>
#include <string>
#include <random>

std::default_random_engine generator;
std::uniform_real_distribution<double> distribution(0.0,2.0);



//////////////////////////////////////////////////////////////////////////////////////////////////////
///Misc.
//////////////////////////////////////////////////////////////////////////////////////////////////////

#define HOME_SERVER_ID 127001
#define NUM_OWNER_COMMANDS 2
#define COMMON_SPOT 6+NUM_OWNER_COMMANDS+connectionRequest



//////////////////////////////////////////////////////////////////////////////////////////////////////
///Starting Conditions
//////////////////////////////////////////////////////////////////////////////////////////////////////

/*add method of creating/loading custom partical types at startup as well*/

#define PARTICLE_COUNT 1000
#define INITIAL_PARTICLE_TYPES 3

//The first value is equal to the number of other values which are true + 1 for the counter-gravity thing.
#define INTERACTIONS_CREATED 2
#define ALLOW_ACID_BASE_REACTIONS 1


//////////////////////////////////////////////////////////////////////////////////////////////////////
///Data Structures
//////////////////////////////////////////////////////////////////////////////////////////////////////

/*particle STRUCT*/

struct particle
{
    double X, Y, Z, Vx, Vy, Vz, quanta;
    int type;
};

/*particle types struct*/

struct particleInformation
{
    int R,G,B;
    float A;
};



//////////////////////////////////////////////////////////////////////////////////////////////////////
///Prototypes
//////////////////////////////////////////////////////////////////////////////////////////////////////

//Correct point location and velocity vector if it leaves the cube.
inline void correctMovingPoint(particle *point);

inline bool requestConnection(char *serverIP);

inline void outputFunction(int y, int x, bool bClear, int y2, int x2, std::string output);
